import logging,yagmail

class Toolb():

    def Log(self):
        logging.basicConfig(filename='../rklog.log', filemode='w+',
                            level=logging.INFO,
                            format='%filename->%message->%leveaname->%asttime')


    def Email(self,file):
        yagmail.SMTP(user='1522057104@qq.com',password='redctgbf',host='@qq.com',port=426)
        yagmail.sender.SMTP(to='1522057104@qq.com',subject='A3mall测试',contents='测试报告')


if __name__ == '__main__':
    Toolb().Log()
    Toolb.Email('rklog.log','baogao.html')